package com.github.yoojia.mqtt.boot.actuators;

import com.github.yoojia.mqtt.MQTTSocket;
import com.github.yoojia.mqtt.Message;
import com.github.yoojia.mqtt.boot.Actuator;
import com.github.yoojia.mqtt.boot.ReqRepActuator;

/**
 * @author Yoojia Chen (yoojiachen@gmail.com)
 * @since 1.0.0
 */
public class ECHOActuator extends Actuator.Simple implements ReqRepActuator {

    @Override
    public Message handleRequest(MQTTSocket socket, Message message) {
        return socket.createReplyMessageOf(message, message.payload);
    }
}
